home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Click 1 (Special Issue) / fantasy.iso / Demo The Druid King / DemoMap.pak / SEQUENCES_S04_DUMNORIX.VS < prev    next >
Text File  |  2001-04-11  |  2KB  |  71 lines

  1. //void
  2. NamedObj Keltill, Dumnorix;
  3. Conversation conv;
  4. TRect rc;
  5. ObjSet Delvanians;
  6. ObjList Delv;
  7. int i;
  8.  
  9. /*
  10. //init part - delete this
  11.  
  12. CreateNamedObj("Keltill", PlaceEx("Keltill", 1537, 12626, 1));
  13. PlayersAlly(1,4);
  14. PlayersShareView(1,4);
  15.   */
  16.  
  17.  
  18. //init part - keep this
  19.     Keltill = GetNamedObj("Keltill");
  20.     Dumnorix = CreateNamedObj("Dumnorix", PlaceEx("Dumnorix", 1779, 10626, 4));
  21.     PlaceBlockEx("GAxeman", 4, 1700, 10680, 5, 2, 25, 45, "Delvanians");
  22.     Delvanians = GetObjSet("Delvanians");
  23.     Delvanians.AddCommand(true, "attach", Dumnorix.obj);
  24.     Delvanians.KillCommand();
  25.  
  26. //Conv 13
  27.     Dumnorix.obj.AddCommand(true, "approach", Keltill.obj);
  28.     Dumnorix.obj.KillCommand();
  29.  
  30.     while(Dumnorix.obj.script == "approach") Sleep(500);
  31.  
  32.     conv.Init("DM C13", 2, 0);
  33.     conv.Run();
  34.  
  35.     if (EnvReadString("/DM C13/Return Value") == "ally") {
  36.         Dumnorix.obj.SetPlayer(1);
  37.         Delv = Delvanians.GetObjList();
  38.         for (i=0; i<Delv.Count(); i+=1) Delv[i].SetPlayer(1);
  39.         EnvWriteInt("/NewNote", 6);
  40.         Run("CurrentMap/mission_notes.vs");
  41.         //rc.Set(10085, 7298, 10212, 7508); //small rect - center of shrine
  42.         rc.Set(9890, 7106, 10427, 7614); //larger rect - whole Stonehange
  43.         while (1) {
  44.             if (ptInRect(Dumnorix.obj.pos, rc)) break;
  45.             Sleep(500);
  46.         }
  47.         EnvWriteInt("/Note6", 0);
  48.         Dumnorix.obj.AsUnit.SetExperience(Dumnorix.obj.AsUnit.experience + 20);
  49.         EnvWriteInt("/s04_dumnorix/finished", 1);
  50.     } else if (EnvReadString("/DM C13/Return Value") == "farewell") {
  51.         Dumnorix.obj.AddCommand(true, "move", point(10146, 7375));
  52.         Dumnorix.obj.KillCommand();
  53.         while (Dumnorix.obj.script == "move" || Dumnorix.obj.script == "advance") Sleep(500);
  54.         Sleep(10000); //make offering
  55.         Dumnorix.obj.AddCommand(true, "move", point(9941, 4885));
  56.         Dumnorix.obj.KillCommand();
  57.         while (Dumnorix.obj.script == "move" || Dumnorix.obj.script == "advance") Sleep(500);
  58.         Dumnorix.obj.Delete();
  59.         Delv = Delvanians.GetObjList();
  60.         for (i=0; i<Delv.Count(); i+=1) Delv[i].Delete();
  61.         EnvWriteInt("/s04_dumnorix/finished", 1);
  62.     } else if (EnvReadString("/DM C13/Return Value") == "enemy") {
  63.         Dumnorix.obj.SetPlayer(5);
  64.         Delv = Delvanians.GetObjList();
  65.         for (i=0; i<Delv.Count(); i+=1) Delv[i].SetPlayer(5);
  66.         Dumnorix.obj.AddCommand(true, "attack", Keltill.obj);
  67.         Dumnorix.obj.KillCommand();
  68.         while (!Dumnorix.IsDead) Sleep(500);
  69.         EnvWriteInt("/s04_dumnorix/finished", 1);
  70.     } else pr("Conv. 13 didn't finish as expected");
  71.